{include file="common/header.tpl"}
{if $AppUI->id <= 0}
	{include file="index/login.tpl"}  
{else}
	{include file="common/menu.tpl"}
    <div class="rightColumn">
    	<div class="boxContent">
        	<div class="contentItem">
                <div class="contentItems">
                	<div class="headerTitle"><h2><a href="{if isset($smarty.session.post.prefer)}{$smarty.session.post.prefer}{else}{$strRefer}{/if}">Bìa hồ sơ</a> &raquo; Cập nhật</h2></div>
                    <div class="secData">
                    	<form name="frmEdit" id="frmEdit" method="post" enctype="multipart/form-data" action="{$smarty.const.HOST_BACKEND}cover/saveedit">
                        	<input type="hidden" name="prefer" id="prefer" value="{if isset($smarty.session.post.prefer)}{$smarty.session.post.prefer}{else}{$strRefer}{/if}" />
                            <input type="hidden" name="puserid" id="puserid" value="{$row.userid}" />
                            <input type="hidden" name="pcoverid" id="pcoverid" value="{$row.coverid}" />
                        	{if isset($smarty.session.coerr)}
                            	<div class="userInput">
                                    <span class="errorMessage">{$smarty.session.coerr}</span>
                                </div>
                            {/if}
	                        <div class="userInput">
                            	<label for="pname">Mẫu <span class="symbolRequired">*</span>:</label>
                                <input type="text" class="text" name="pname" id="pname" value="{if isset($smarty.session.post.pname)}{$smarty.session.post.pname|escape}{else}{$row.name|escape}{/if}" maxlength="150" />
                            </div>
                            <div class="userInput">
                            	<label for="pimage">Hình:</label>
                                <input type="file" class="text" name="pimage" id="pimage"/>
                            </div>
                            {if $row.image != ""}
                                <div class="userInput">
                                    <label>Hình đã đăng:</label>
                                    {image path=$row.image type=6 small=1}
                                </div>
                            {/if}
                        	<div class="userInput">
                            	<label for="pdisorder">Hiển thị:</label>
                                <input type="text" class="text" name="pdisorder" id="pdisorder" value="{if isset($smarty.session.post.pdisorder)}{$smarty.session.post.pdisorder}{else}{$row.disorder}{/if}" onkeypress="javascript: return isNumberKey(event);" />
                            </div>
                            <div class="secAction">
                        		<input type="submit" value="Lưu dữ liệu"/>
                               	<input type="reset" value="Nhập lại"/>
                            </div>
                        </form>
                   	</div>
                </div>
          	</div>
        </div>
    </div>
{/if}
{include file="common/footer.tpl"}
                
